package com.anonymous.community.hotfix;

/**
 * 更新信息数据类
 * 用于封装服务器返回的更新信息
 */
public class UpdateInfo {
    
    // 是否有更新
    private boolean hasUpdate;
    
    // 补丁版本号
    private String patchVersion;
    
    // 补丁下载链接
    private String downloadUrl;
    
    // 补丁文件大小（字节）
    private long fileSize;
    
    // 补丁MD5值
    private String md5;
    
    // 更新描述
    private String description;
    
    // 是否强制更新
    private boolean forceUpdate;
    
    // 最低支持的应用版本
    private String minAppVersion;
    
    public UpdateInfo() {
    }
    
    public UpdateInfo(boolean hasUpdate, String patchVersion, String downloadUrl, 
                     long fileSize, String md5, String description, boolean forceUpdate, 
                     String minAppVersion) {
        this.hasUpdate = hasUpdate;
        this.patchVersion = patchVersion;
        this.downloadUrl = downloadUrl;
        this.fileSize = fileSize;
        this.md5 = md5;
        this.description = description;
        this.forceUpdate = forceUpdate;
        this.minAppVersion = minAppVersion;
    }
    
    // Getters and Setters
    public boolean isHasUpdate() {
        return hasUpdate;
    }
    
    public void setHasUpdate(boolean hasUpdate) {
        this.hasUpdate = hasUpdate;
    }
    
    public String getPatchVersion() {
        return patchVersion;
    }
    
    public void setPatchVersion(String patchVersion) {
        this.patchVersion = patchVersion;
    }
    
    public String getDownloadUrl() {
        return downloadUrl;
    }
    
    public void setDownloadUrl(String downloadUrl) {
        this.downloadUrl = downloadUrl;
    }
    
    public long getFileSize() {
        return fileSize;
    }
    
    public void setFileSize(long fileSize) {
        this.fileSize = fileSize;
    }
    
    public String getMd5() {
        return md5;
    }
    
    public void setMd5(String md5) {
        this.md5 = md5;
    }
    
    public String getDescription() {
        return description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    
    public boolean isForceUpdate() {
        return forceUpdate;
    }
    
    public void setForceUpdate(boolean forceUpdate) {
        this.forceUpdate = forceUpdate;
    }
    
    public String getMinAppVersion() {
        return minAppVersion;
    }
    
    public void setMinAppVersion(String minAppVersion) {
        this.minAppVersion = minAppVersion;
    }
    
    @Override
    public String toString() {
        return "UpdateInfo{" +
                "hasUpdate=" + hasUpdate +
                ", patchVersion='" + patchVersion + '\'' +
                ", downloadUrl='" + downloadUrl + '\'' +
                ", fileSize=" + fileSize +
                ", md5='" + md5 + '\'' +
                ", description='" + description + '\'' +
                ", forceUpdate=" + forceUpdate +
                ", minAppVersion='" + minAppVersion + '\'' +
                '}';
    }
}